<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  
  <title>Promise | Hexo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="说一下你对 Promise 的理解？">
<meta property="og:type" content="article">
<meta property="og:title" content="Promise">
<meta property="og:url" content="https://ifercarly.gitee.io/jy91/2023/05/26/promise/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="说一下你对 Promise 的理解？">
<meta property="og:locale" content="en_US">
<meta property="article:published_time" content="2023-05-26T12:47:28.000Z">
<meta property="article:modified_time" content="2023-05-26T12:49:09.643Z">
<meta property="article:author" content="John Doe">
<meta name="twitter:card" content="summary">
  
    <link rel="alternate" href="/jy91/atom.xml" title="Hexo" type="application/atom+xml">
  
  
    <link rel="shortcut icon" href="/jy91/favicon.png">
  
  
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/typeface-source-code-pro@0.0.71/index.min.css">

  
  
<link rel="stylesheet" href="/jy91/css/style.css">

  
    
<link rel="stylesheet" href="/jy91/fancybox/jquery.fancybox.min.css">

  
  
<meta name="generator" content="Hexo 6.3.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/jy91/" id="logo">Hexo</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"><span class="fa fa-bars"></span></a>
        
          <a class="main-nav-link" href="/jy91/">Home</a>
        
          <a class="main-nav-link" href="/jy91/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
        
          <a class="nav-icon" href="/jy91/atom.xml" title="RSS Feed"><span class="fa fa-rss"></span></a>
        
        <a class="nav-icon nav-search-btn" title="Search"><span class="fa fa-search"></span></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="https://ifercarly.gitee.io/jy91"></form>
      </div>
    </div>
  </div>
</header>

      <div class="outer">
        <section id="main"><article id="post-promise" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/jy91/2023/05/26/promise/" class="article-date">
  <time class="dt-published" datetime="2023-05-26T12:47:28.000Z" itemprop="datePublished">2023-05-26</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="p-name article-title" itemprop="headline name">
      Promise
    </h1>
  

      </header>
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <p>说一下你对 Promise 的理解？</p>
<span id="more"></span>

<h2 id="是什么"><a href="#是什么" class="headerlink" title="是什么"></a>是什么</h2><p>它是 ES6 提供的一个对象，一般会当做构造函数去使用，需要 new 一下得到一个 Promise 实例…</p>
<h2 id="怎么用"><a href="#怎么用" class="headerlink" title="怎么用"></a>怎么用</h2><h2 id="解决了什么问题"><a href="#解决了什么问题" class="headerlink" title="解决了什么问题"></a>解决了什么问题</h2><h2 id="有没有替代方案"><a href="#有没有替代方案" class="headerlink" title="有没有替代方案"></a>有没有替代方案</h2><h2 id="好处是什么"><a href="#好处是什么" class="headerlink" title="好处是什么"></a>好处是什么</h2><h2 id="场景是什么"><a href="#场景是什么" class="headerlink" title="场景是什么"></a>场景是什么</h2><h2 id="原理是什么"><a href="#原理是什么" class="headerlink" title="原理是什么"></a>原理是什么</h2>
      
    </div>
    <footer class="article-footer">
      <a data-url="https://ifercarly.gitee.io/jy91/2023/05/26/promise/" data-id="cli4k5nnu0001bgvn5dwo5ug8" data-title="Promise" class="article-share-link"><span class="fa fa-share">Share</span></a>
      
      
      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/jy91/2023/05/27/a/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          a
        
      </div>
    </a>
  
  
    <a href="/jy91/2023/05/26/hello-world/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">Hello World</div>
    </a>
  
</nav>

  
</article>


</section>
        
          <aside id="sidebar">
  
    

  
    

  
    
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/jy91/archives/2023/05/">May 2023</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/jy91/2023/05/27/a/">a</a>
          </li>
        
          <li>
            <a href="/jy91/2023/05/26/promise/">Promise</a>
          </li>
        
          <li>
            <a href="/jy91/2023/05/26/hello-world/">Hello World</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      
      &copy; 2023 John Doe<br>
      Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

    </div>
    <nav id="mobile-nav">
  
    <a href="/jy91/" class="mobile-nav-link">Home</a>
  
    <a href="/jy91/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    


<script src="/jy91/js/jquery-3.6.4.min.js"></script>



  
<script src="/jy91/fancybox/jquery.fancybox.min.js"></script>




<script src="/jy91/js/script.js"></script>





  </div>
</body>
</html>